package architect;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

import java.util.concurrent.TimeUnit;

/**
 * Eureka Server启动类
 *
 * @author guanxin
 * @date 2018/4/8 15:59
 */

@EnableEurekaServer
@SpringBootApplication
public class EurekaServerApp implements CommandLineRunner {

    public static void main( String[] args ) throws InterruptedException {
        SpringApplication.run(EurekaServerApp.class, args);
        TimeUnit.MINUTES.sleep(10);
        System.err.println("Eureka Server=============>>>>>>>>>>>>>服务关闭");
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("Eureka Server=============>>>>>>>>>>>>>启动完毕");
    }
}
